package com.xysd.express.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xysd.express.R;
import com.xysd.express.bean.CompanyListObj;

/**
 * Created by donghui on 2017/11/20.
 */

public class CompanyListAdpter extends BaseQuickAdapter<CompanyListObj.Company,BaseViewHolder> {
    Context context;

    public CompanyListAdpter(@LayoutRes int layoutResId, Context context) {
        super(layoutResId);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, CompanyListObj.Company item) {
        ImageView img=helper.getView(R.id.company_img);
        Glide.with(context).load(item.LogoUrl).into(img);
        helper.setText(R.id.company_tv,item.CompanyName);
        helper.setText(R.id.tel_tv,item.Tel);
        helper.setText(R.id.adds_tv,item.Address);
    }
}
